﻿using System;

namespace 自定义特性_反射
{
    public class CurstomAttribute : Attribute
    {
        public string DevelopName { get; set; }
        public string Description { get; set; }
        public string Message { get; set; }
        public CurstomAttribute(string developName, string description, string message)
        {
            DevelopName = developName;
            Description = description;
            Message = message;
        }
    }

    [Curstom("于晟", "程序描述", "This is CodeMessage.")]
    public class DebugClass
    {
        [Curstom("于晟", "计算两数之和", "This is Function Add() Message.")]
        public int Add(int x, int y) => x + y;

        [Curstom("于晟", "Show Function Display Info.", "This is Function Display() Message.")]
        public void Display()
        {
            Console.WriteLine("DebugClass -> Display");
        }

        [Curstom("ShengYu", "Show Function Show Info.", "This is Function Show() Message.")]
        public void Show()
        {
            Console.WriteLine("DebugClass -> Display");
        }
    }
}
